package SpringBoot.spring_boot_starter_security.D02_定义需要验证和不需要验证URL.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.titan.core.web.utils.ControllerUtils;

/**
 *
 *
 * @author 周成功
 *
 */
@RestController
public class D02Controller {
    @RequestMapping("/security")  
    public void security(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ControllerUtils.writeHtml(response, "需要验证才能显示");
    }
    
    
    @RequestMapping("/hello")  
    public void hello(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ControllerUtils.writeHtml(response, "不验证哦");
    }    
}
